﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
using WLWeb.PulbicClass;

namespace WLWeb.Common
{
    public partial class Service : System.Web.UI.Page
    {
        string CategoryId = "";
        BLL.wlBLL.Acticle art = new BLL.wlBLL.Acticle();
        protected void Page_Load(object sender, EventArgs e)
        {
            webleft1.Acticle = Webpublic.GetGroupName(4);
            webleft1.Title = "产品服务";
            InitData();
        }
        protected void InitData()
        {
            string group = Webpublic.GetGroupName(4);
            if (Request.QueryString["OtherCategoryID"] != null && !string.IsNullOrEmpty(Request.QueryString["OtherCategoryID"].ToString()))
            {
                CategoryId = Request.QueryString["OtherCategoryID"].ToString();
            }
            if (CategoryId != "")
            {
                DataTable dtcontent = art.GetActicleInfo(new Hashtable() { { "OtherCategoryID", CategoryId } });             //获取产品服务此组数据
                if (dtcontent != null && dtcontent.Rows.Count > 0)
                {
                    lilContent.Text = dtcontent.Rows[0]["ArticleContent"].ToString();
                    litTitle.Text = "您当前的位置：<a href=\"../Common/Index\">网站首页</a> &gt;&gt;" + dtcontent.Rows[0]["OtherCategoryName"].ToString();
                    litHead.Text = dtcontent.Rows[0]["OtherCategoryName"].ToString();
                }
            }
            else{
                DataTable dtcontent = art.GetActicleInfo(new Hashtable() { { "OtherCategoryGroup", group } });             //获取产品服务此组数据
                if (dtcontent != null && dtcontent.Rows.Count > 0)
                {
                    lilContent.Text = dtcontent.Rows[0]["ArticleContent"].ToString();
                    litTitle.Text = "您当前的位置：<a href=\"../Common/Index\">网站首页</a> &gt;&gt;" + dtcontent.Rows[0]["OtherCategoryName"].ToString();
                    litHead.Text = dtcontent.Rows[0]["OtherCategoryName"].ToString();
                }
            }
        }
    }
}